package wu.com;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class logServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String name=request.getParameter("name");
        String pas=request.getParameter("password");
        Yonghudenglu yonghudenglu=new Yonghudenglu();
        boolean a=yonghudenglu.login(name,pas);
        if (a){
            PrintWriter out = response.getWriter();
            out.println("登录成功");
        }
        else {
            PrintWriter out = response.getWriter();
            out.println("登录失败");
        }
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
